package com.ruoyi.member.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 用户和家庭关联对象 family_user_relation
 * 
 * @author ruoyi
 * @date 2025-04-20
 */
public class FamilyUserRelation extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 系统用户id（来自sys_user.id） */
    @Excel(name = "系统用户id", readConverterExp = "来=自sys_user.id")
    private Long userId;

    /** 家庭id（来自families.id） */
    @Excel(name = "家庭id", readConverterExp = "来=自families.id")
    private Long familyId;

    /** 角色（owner/viewer/editor） */
    @Excel(name = "角色", readConverterExp = "o=wner/viewer/editor")
    private String role;

    /** 是否激活关联 */
    @Excel(name = "是否激活关联")
    private Long isActive;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setFamilyId(Long familyId) 
    {
        this.familyId = familyId;
    }

    public Long getFamilyId() 
    {
        return familyId;
    }

    public void setRole(String role) 
    {
        this.role = role;
    }

    public String getRole() 
    {
        return role;
    }

    public void setIsActive(Long isActive) 
    {
        this.isActive = isActive;
    }

    public Long getIsActive() 
    {
        return isActive;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("familyId", getFamilyId())
            .append("role", getRole())
            .append("isActive", getIsActive())
            .append("createTime", getCreateTime())
            .toString();
    }
}
